package com.sopra.tecnica.poc.server.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.sopra.tecnica.poc.server.entity.CustomerEntity;

@Repository
public class CustomerDao extends ADao<CustomerEntity> {

	@Override
	protected Class<CustomerEntity> getManagedClass() {
		return CustomerEntity.class;
	}

	public List<Map<String, Object>> findOrderCustomer(int orderNum) {
		return getJdbcTemplate().queryForList(
				"SELECT lraisoc, ladresse, lcp, lville, fraisoc, fadresse, fcp, fville"
				+ " FROM pub.entcde"
				+ " WHERE noccde = ?", orderNum);
	}
}
